package be.niob.apps.huisarts;

import java.io.IOException;

import org.apache.http.client.ClientProtocolException;

import android.app.Activity;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import be.niob.apps.huisarts.model.Wachtdienst;
import be.niob.apps.huisarts.service.WachtdienstService;

public class Main extends Activity implements OnClickListener {

	private EditText evGemeente;
	private EditText evPostcode;
	
	private Button btOk;
	
	private TextView tvGemeente;
	private TextView tvPostcode;
	private TextView tvNummer;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		//initViews();

		/*try {
			Wachtdienst wd = WachtdienstService.getWachtdienstInGemeente("", "9032");
			tvGemeente.setText(wd.getGemeente());
			tvPostcode.setText(wd.getPostcode());
			tvNummer.setText(wd.getNummer());
		} catch (ClientProtocolException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}*/
	}

	/*private void initViews() {
		evGemeente = (EditText) findViewById(R.id.evGemeente);
		evPostcode = (EditText) findViewById(R.id.evPostcode);
		btOk = (Button) findViewById(R.id.btOk);
		btOk.setOnClickListener(this);
		tvGemeente = (TextView) findViewById(R.id.tvGemeente);
		tvPostcode = (TextView) findViewById(R.id.tvPostcode);
		tvNummer = (TextView) findViewById(R.id.tvNummer);
	}*/

	@Override
	public void onClick(View arg0) {
		if (arg0.getId() == btOk.getId()) {
			Toast.makeText(this, "klik ok!", Toast.LENGTH_LONG).show();
		}
	}
}